<!--
 * @Author: 杨涛 2749552387@qq.com
 * @Date: 2024-10-30 17:11:37
 * @LastEditors: 杨涛 2749552387@qq.com
 * @LastEditTime: 2024-10-30 17:17:16
 * @FilePath: \Midas-Insight\ue4交互.html
 * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
-->
<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Document</title>
    <script>
      "object" != typeof ue || "object" != typeof ue.interface
        ? ("object" != typeof ue && (ue = {}),
          (ue.interface = {}),
          (ue.interface.broadcast = function (e, t) {
            if ("string" == typeof e) {
              var o = [e, ""];
              void 0 !== t && (o[1] = t);
              var n = encodeURIComponent(JSON.stringify(o));
              "object" == typeof history &&
              "function" == typeof history.pushState
                ? (history.pushState({}, "", "#" + n),
                  history.pushState({}, "", "#" + encodeURIComponent("[]")))
                : ((document.location.hash = n),
                  (document.location.hash = encodeURIComponent("[]")));
            }
          }))
        : (function (e) {
            (ue.interface = {}),
              (ue.interface.broadcast = function (t, o) {
                "string" == typeof t &&
                  (void 0 !== o
                    ? e.broadcast(t, JSON.stringify(o))
                    : e.broadcast(t, ""));
              });
          })(ue.interface),
        (ue4 = ue.interface.broadcast);

         // js调用ue4， 参数1：函数名 参数2：json数据对象
    // 该调用可根据具体需求写在对应位置，此处为测试 
    ue4('JScallUE4', { name: 'xiaoli' });
    </script>
  </head>
  <body></body>
</html>
